This invention relates to a numerical control method and, more particularly, to a numerical control method adapted so that G-code data may be expressed in the form of the letter G, a numerical value following the letter G, and a code following the numerical value.
A numerical control device, referred to as an NC device, is adapted to read numerical control data such as positional data, M-code data and G-code data from a tape or internal memory sequentially in a block-by-block fashion, and to execute processing based on the numerical control data to control a machine tool. The G-code data mentioned above specifies the control function of the NC device and is expressed by the letter of the alphabet G and a two-digit numerical value following the letter G. When an item of G-code data is commanded, the NC device performs preparatory and processing operations to perform the control function indicated by that item of G-code data.
FIG. 1 is a table showing the correspondence between various items of conventional G-code data and control functions. Items of related G-code data are grouped as follows: (a) G00 to G03; (b) G17 to G19; (c) G20, G21; (d) G22, G23; (e) G40 to G42; (f) G43, G44, G49; (g) G73 to G89; (h) G90, G91; (i) G94, G95; and (j) G98, G99. Each of the items of G-code data in the same group comprises so-called modal information with respect to the other items in that group. This means that when one item of G-code data is commanded, the item of data is effective until another item of G-code data in the same group is commanded. For example, the items of G-code data "G90", "G91" indicative of absolute and incremental inputs, respectively, belong to the same group and together form modal information. Once G90 is commanded, therefore, the NC device will recognize an entered positional command value as an absolute positional command until G91 is commanded. It should be noted, however, that the items of G-code data in the groups "00" are not modal type information change commands. In other words, each of the codes in group 00 is effective only in the block in which it is commanded.
As described above, an item of G-code data according to the prior art is commanded by the letter G and a numerical value following G. When it is desired to provide an additional control function, conventional practice is to establish a corresponding G code with a number larger than the other G codes, namely to increase the numerical value which follows the letter G. A disadvantage with this method, however, is that it becomes quite difficult to store the correspondence between the items of G-code data and the G-code data control functions as the G codes grow large in number, and the programmer is compelled to refer repeatedly to a correspondence table, making programming a troublesome and time-consuming task. An attempt at a solution to this problem has been to adopt consecutive numbers for the numbers (namely the numerical values following G) attached to related items of G-code data, but this entails changing G-code data numbers each time it is necessary to add a new control function. Even if consecutive numbers are set aside in advance and left open in anticipation of later being assigned to new control functions, the G-code numbers will still need to be changed when all of the open numbers are eventually used and none are left for assignment to new control functions which may be need to be included. This in turn will necessitate the modification of program specifications and will complicate programming.